import {
  RootSchemaType,
} from '@/components/form-designer/setting-panel/data-source-setting/subscription-service/components/content/composables/useJsonSchemaToTree'

export type Result<T = any> = {
  code: number // 响应码
  data: T // 响应数据
  message: string // 响应消息
}

export type TableInfo<T = any> = {
  code: number
  rows: T[]
  total: number
  message: string
}
export type SchemaTableType = TableInfo & {
  schema: RootSchemaType
}

export type PageOptions = {
  params?: Record<string, unknown> & {
    pageIndex: number
    pageSize: number
  }
  headers?: Record<string, any>
  errorMessage?: string
}

export type GetOptions = {
  params?: Record<string, unknown>
  headers?: Record<string, any>
  errorMessage?: string
}
